var number = 10;
var startingPage;

//初始数据
function loadWebList() {
    startingPage = 0;
    var data = {
        "page": startingPage,
        "number": number
    };
    $.ajax({
        url: "findUserPlaintByUserPlaintList",
        type: "POST",
        dataType: "json",
        data: JSON.stringify(data),
        contentType: 'application/json;charset=utf-8',
        success: function (data) {
            var code = ' ';
            if (data.code == 500) {
            } else {
                for (var i = 0; i < data.userPlaint_List.length; i++) {
                    if (data.userPlaint_List[i].userPlaintGrade == 5) {
                        code += " <div class=\"blog-box-layout2\">\n" +
                            "                            <div class=\"item-content\">\n" +
                            "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                            "                            <ul class=\"blog-entry-meta\">\n" +
                            "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                            "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                            "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                            "                            </ul>\n" +
                            "                            <p><div class=\"d-flex align-items-center\">\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                            "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                            "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                            "</div></p>\n" +
                            "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                            "                        </div>\n" +
                            "                    </div>"
                    } else if (data.userPlaint_List[i].userPlaintGrade == 4) {
                        code += " <div class=\"blog-box-layout2\">\n" +
                            "                            <div class=\"item-content\">\n" +
                            "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                            "                            <ul class=\"blog-entry-meta\">\n" +
                            "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                            "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                            "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                            "                            </ul>\n" +
                            "                            <p><div class=\"d-flex align-items-center\">\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                            "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                            "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                            "</div></p>\n" +
                            "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                            "                        </div>\n" +
                            "                    </div>"
                    } else if (data.userPlaint_List[i].userPlaintGrade == 3) {
                        code += " <div class=\"blog-box-layout2\">\n" +
                            "                            <div class=\"item-content\">\n" +
                            "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                            "                            <ul class=\"blog-entry-meta\">\n" +
                            "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                            "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                            "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                            "                            </ul>\n" +
                            "                            <p><div class=\"d-flex align-items-center\">\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                            "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                            "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                            "</div></p>\n" +
                            "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                            "                        </div>\n" +
                            "                    </div>"
                    } else if (data.userPlaint_List[i].userPlaintGrade == 2) {
                        code += " <div class=\"blog-box-layout2\">\n" +
                            "                            <div class=\"item-content\">\n" +
                            "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                            "                            <ul class=\"blog-entry-meta\">\n" +
                            "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                            "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                            "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                            "                            </ul>\n" +
                            "                            <p><div class=\"d-flex align-items-center\">\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                            "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                            "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                            "</div></p>\n" +
                            "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                            "                        </div>\n" +
                            "                    </div>"
                    } else if (data.userPlaint_List[i].userPlaintGrade == 1) {
                        code += " <div class=\"blog-box-layout2\">\n" +
                            "                            <div class=\"item-content\">\n" +
                            "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                            "                            <ul class=\"blog-entry-meta\">\n" +
                            "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                            "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                            "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                            "                            </ul>\n" +
                            "                            <p><div class=\"d-flex align-items-center\">\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                            "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                            "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                            "</div></p>\n" +
                            "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                            "                        </div>\n" +
                            "                    </div>"
                    } else {
                        code += " <div class=\"blog-box-layout2\">\n" +
                            "                            <div class=\"item-content\">\n" +
                            "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                            "                            <ul class=\"blog-entry-meta\">\n" +
                            "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                            "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                            "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                            "                            </ul>\n" +
                            "                            <p><div class=\"d-flex align-items-center\">\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                            "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                            "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                            "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                            "</div></p>\n" +
                            "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                            "                        </div>\n" +
                            "                    </div>"
                    }
                }
                $("#SellerData").html(code);
                $("#pageNumber").val(data.count);
                $("#myProjectTable").html("   <div class=\"btn-prev\">\n" +
                    "                            <a onclick='myProjectTable_previous()'><i class=\"fas fa-angle-double-left\"></i>Previous</a>\n" +
                    "                        </div>\n" +
                    "                        <div class=\"page-number\">\n" +
                    "                            <a href=\"#\" class=\"active\">" + (startingPage + 1) + "</a>\n" +
                    "                        </div>\n" +
                    "                        <div class=\"btn-next\">\n" +
                    "                            <a onclick='myProjectTable_next()'>Next<i class=\"fas fa-angle-double-right\"></i></a>\n" +
                    "                        </div>");
            }
        }
    });
}

//上一页
function myProjectTable_previous() {
    startingPage = startingPage - 1;
    if (startingPage < 0) {
        startingPage = 0;
        Swal.fire("提示", "数据不存在", "warning");
    } else {
        var data = {
            "page": startingPage * number,
            "number": number
        };
        $.ajax({
            url: "findUserPlaintByUserPlaintList",
            type: "POST",
            dataType: "json",
            data: JSON.stringify(data),
            contentType: 'application/json;charset=utf-8',
            success: function (data) {
                var code = ' ';
                if (data.code == 500) {
                } else {
                    for (var i = 0; i < data.userPlaint_List.length; i++) {
                        if (data.userPlaint_List[i].userPlaintGrade == 5) {
                            code += " <div class=\"blog-box-layout2\">\n" +
                                "                            <div class=\"item-content\">\n" +
                                "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                                "                            <ul class=\"blog-entry-meta\">\n" +
                                "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                                "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                                "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                                "                            </ul>\n" +
                                "                            <p><div class=\"d-flex align-items-center\">\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "</div></p>\n" +
                                "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                                "                        </div>\n" +
                                "                    </div>"
                        } else if (data.userPlaint_List[i].userPlaintGrade == 4) {
                            code += " <div class=\"blog-box-layout2\">\n" +
                                "                            <div class=\"item-content\">\n" +
                                "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                                "                            <ul class=\"blog-entry-meta\">\n" +
                                "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                                "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                                "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                                "                            </ul>\n" +
                                "                            <p><div class=\"d-flex align-items-center\">\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "</div></p>\n" +
                                "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                                "                        </div>\n" +
                                "                    </div>"
                        } else if (data.userPlaint_List[i].userPlaintGrade == 3) {
                            code += " <div class=\"blog-box-layout2\">\n" +
                                "                            <div class=\"item-content\">\n" +
                                "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                                "                            <ul class=\"blog-entry-meta\">\n" +
                                "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                                "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                                "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                                "                            </ul>\n" +
                                "                            <p><div class=\"d-flex align-items-center\">\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "</div></p>\n" +
                                "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                                "                        </div>\n" +
                                "                    </div>"
                        } else if (data.userPlaint_List[i].userPlaintGrade == 2) {
                            code += " <div class=\"blog-box-layout2\">\n" +
                                "                            <div class=\"item-content\">\n" +
                                "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                                "                            <ul class=\"blog-entry-meta\">\n" +
                                "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                                "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                                "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                                "                            </ul>\n" +
                                "                            <p><div class=\"d-flex align-items-center\">\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "</div></p>\n" +
                                "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                                "                        </div>\n" +
                                "                    </div>"
                        } else if (data.userPlaint_List[i].userPlaintGrade == 1) {
                            code += " <div class=\"blog-box-layout2\">\n" +
                                "                            <div class=\"item-content\">\n" +
                                "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                                "                            <ul class=\"blog-entry-meta\">\n" +
                                "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                                "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                                "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                                "                            </ul>\n" +
                                "                            <p><div class=\"d-flex align-items-center\">\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "</div></p>\n" +
                                "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                                "                        </div>\n" +
                                "                    </div>"
                        } else {
                            code += " <div class=\"blog-box-layout2\">\n" +
                                "                            <div class=\"item-content\">\n" +
                                "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                                "                            <ul class=\"blog-entry-meta\">\n" +
                                "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                                "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                                "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                                "                            </ul>\n" +
                                "                            <p><div class=\"d-flex align-items-center\">\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "</div></p>\n" +
                                "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                                "                        </div>\n" +
                                "                    </div>"
                        }
                    }
                    $("#SellerData").html(code);
                    $("#pageNumber").val(data.count);
                    $("#myProjectTable").html("   <div class=\"btn-prev\">\n" +
                        "                            <a onclick='myProjectTable_previous()'><i class=\"fas fa-angle-double-left\"></i>Previous</a>\n" +
                        "                        </div>\n" +
                        "                        <div class=\"page-number\">\n" +
                        "                            <a href=\"#\" class=\"active\">" + (startingPage + 1) + "</a>\n" +
                        "                        </div>\n" +
                        "                        <div class=\"btn-next\">\n" +
                        "                            <a onclick='myProjectTable_next()'>Next<i class=\"fas fa-angle-double-right\"></i></a>\n" +
                        "                        </div>");
                }
            }
        });
    }
}

//下一页
function myProjectTable_next() {
    startingPage = startingPage + 1;
    var startingPageNumber = startingPage * number;
    var numberSum = $("#pageNumber").val();
    if (startingPageNumber >= numberSum && (startingPageNumber - number) <= numberSum) {
        startingPage = startingPage - 1;
        Swal.fire("提示", "数据浏览已到底", "warning");
    } else {
        var data = {
            "page": startingPageNumber,
            "number": number
        };
        $.ajax({
            url: "findUserPlaintByUserPlaintList",
            type: "POST",
            dataType: "json",
            data: JSON.stringify(data),
            contentType: 'application/json;charset=utf-8',
            success: function (data) {
                var code = ' ';
                if (data.code == 500) {
                } else {
                    for (var i = 0; i < data.userPlaint_List.length; i++) {
                        if (data.userPlaint_List[i].userPlaintGrade == 5) {
                            code += " <div class=\"blog-box-layout2\">\n" +
                                "                            <div class=\"item-content\">\n" +
                                "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                                "                            <ul class=\"blog-entry-meta\">\n" +
                                "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                                "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                                "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                                "                            </ul>\n" +
                                "                            <p><div class=\"d-flex align-items-center\">\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "</div></p>\n" +
                                "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                                "                        </div>\n" +
                                "                    </div>"
                        } else if (data.userPlaint_List[i].userPlaintGrade == 4) {
                            code += " <div class=\"blog-box-layout2\">\n" +
                                "                            <div class=\"item-content\">\n" +
                                "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                                "                            <ul class=\"blog-entry-meta\">\n" +
                                "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                                "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                                "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                                "                            </ul>\n" +
                                "                            <p><div class=\"d-flex align-items-center\">\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "</div></p>\n" +
                                "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                                "                        </div>\n" +
                                "                    </div>"
                        } else if (data.userPlaint_List[i].userPlaintGrade == 3) {
                            code += " <div class=\"blog-box-layout2\">\n" +
                                "                            <div class=\"item-content\">\n" +
                                "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                                "                            <ul class=\"blog-entry-meta\">\n" +
                                "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                                "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                                "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                                "                            </ul>\n" +
                                "                            <p><div class=\"d-flex align-items-center\">\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "</div></p>\n" +
                                "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                                "                        </div>\n" +
                                "                    </div>"
                        } else if (data.userPlaint_List[i].userPlaintGrade == 2) {
                            code += " <div class=\"blog-box-layout2\">\n" +
                                "                            <div class=\"item-content\">\n" +
                                "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                                "                            <ul class=\"blog-entry-meta\">\n" +
                                "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                                "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                                "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                                "                            </ul>\n" +
                                "                            <p><div class=\"d-flex align-items-center\">\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "</div></p>\n" +
                                "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                                "                        </div>\n" +
                                "                    </div>"
                        } else if (data.userPlaint_List[i].userPlaintGrade == 1) {
                            code += " <div class=\"blog-box-layout2\">\n" +
                                "                            <div class=\"item-content\">\n" +
                                "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                                "                            <ul class=\"blog-entry-meta\">\n" +
                                "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                                "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                                "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                                "                            </ul>\n" +
                                "                            <p><div class=\"d-flex align-items-center\">\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star-fill text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "</div></p>\n" +
                                "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                                "                        </div>\n" +
                                "                    </div>"
                        } else {
                            code += " <div class=\"blog-box-layout2\">\n" +
                                "                            <div class=\"item-content\">\n" +
                                "                                <h2 class=\"item-title\"><a href='#'>" + data.userPlaint_List[i].userPlaintName + "</a></h2>\n" +
                                "                            <ul class=\"blog-entry-meta\">\n" +
                                "                                <li><i class=\"far fa-calendar-alt\"></i>" + data.userPlaint_List[i].userPlaintDate + "</li>\n" +
                                "                                <li><i class=\"fas fa-user\"></i><a href=\"#\">" + data.userPlaint_List[i].userEntity.userNickname + "</a></li>\n" +
                                "                                <li><i class=\"fas fa-comments\"></i>" + data.userPlaint_List[i].userEntity.userEmail + "</li>\n" +
                                "                            </ul>\n" +
                                "                            <p><div class=\"d-flex align-items-center\">\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                            <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "                             <a href=\"#\" class=\"rating-link activ\"><i class=\"bi bi-star text-warning\"></i></a>\n" +
                                "</div></p>\n" +
                                "                            <p>" + data.userPlaint_List[i].userPlaintConter + "</p>\n" +
                                "                        </div>\n" +
                                "                    </div>"
                        }
                    }
                    $("#SellerData").html(code);
                    $("#pageNumber").val(data.count);
                    $("#myProjectTable").html("   <div class=\"btn-prev\">\n" +
                        "                            <a onclick='myProjectTable_previous()'><i class=\"fas fa-angle-double-left\"></i>Previous</a>\n" +
                        "                        </div>\n" +
                        "                        <div class=\"page-number\">\n" +
                        "                            <a href=\"#\" class=\"active\">" + (startingPage + 1) + "</a>\n" +
                        "                        </div>\n" +
                        "                        <div class=\"btn-next\">\n" +
                        "                            <a onclick='myProjectTable_next()'>Next<i class=\"fas fa-angle-double-right\"></i></a>\n" +
                        "                        </div>");
                }
            }
        });
    }
}

//加载数据
$(function () {
    var DATA = '';
    $.ajax({
        url: "JudgeLogin_3",
        type: "POST",
        dataType: "json",
        contentType: 'application/json;charset=utf-8',
        success: function (data) {
            if (data.code == 500) {
                DATA += " <li class=\"header-btn\">\n" +
                    "                                    <a href=\"web-login.html\" class=\"item-btn\"><i class=\"fas fa-plus\"></i>登录</a>\n" +
                    "                                </li>"
                Swal.fire("温馨提示", "请先登录", "warning");
                window.location.href = "web-user-404.html";
            } else {
                DATA += " <li class=\"header-login-icon\">\n" +
                    "                                    <a href=\"web-user-account.html\" class=\"color-light\" data-toggle=\"tooltip\"\n" +
                    "                                       data-placement=\"top\" title=\"Login/Register\">\n" +
                    "                                        <i class=\"far fa-user\">我的</i>\n" +
                    "                                    </a>\n" +
                    "                                </li>\n" +
                    "                                <li class=\"header-btn\">\n" +
                    "                                    <a  onclick='tuichu_1()' class=\"item-btn\"><i class=\"fas fa-plus\"></i>退出</a>\n" +
                    "                                </li>";
                loadWebList();
            }
            $("#userData").html("");
            $("#userData").append(DATA);
        }
    });
})
